<?php
Yii::import('zii.widgets.grid.CGridView');
class iGridView extends CGridView
{
	public $filterClass = 'filter-items';
	public function init()
	{
		$this->cssFile=Yii::app()->theme->baseUrl.'/css/igridview.css';
		parent::init();
	}
	/**
	 * Renders the data items for the grid view.
	 */
	public function renderItems()
	{
		if($this->dataProvider->getItemCount()>0 || $this->showTableOnEmpty)
		{
			if(!$this->hideHeader)
			{
				echo "<table  class=\"{$this->filterClass}\">\n";
					$this->renderFilter();
				echo "</table>";
			}
			echo "<table  class=\"{$this->itemsCssClass}\" rules=\"rows\" bordercolor=\"#EBEBEB\" border=\"0\">\n";
			$this->renderTableHeader();
			ob_start();
			$this->renderTableBody();
			$body=ob_get_clean();
			$this->renderTableFooter();
			echo $body; // TFOOT must appear before TBODY according to the standard.
			echo "</table>";
		}
		else
			$this->renderEmptyText();
	}
	/**
	 * Renders the table header.
	 */
	public function renderTableHeader()
	{
		echo "<thead>\n";
			echo "<tr>\n";
			foreach($this->columns as $column)
				$column->renderHeaderCell();
			echo "</tr>\n";
		echo "</thead>\n";
	}
}